<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <script>
      var txt = "";
      txt += "<p>浏览器代号: " + navigator.appCodeName + "</p>";
      txt += "<p>浏览器名称: " + navigator.appName + "</p>";
      txt += "<p>浏览器版本: " + navigator.appVersion + "</p>";
      txt += "<p>Cookies启用: " + navigator.cookieEnabled + "</p>";
      txt += "<p>浏览器语言: " + navigator.language + "</p>";
      txt += "<p>浏览器是否在线: " + navigator.onLine + "</p>";
      txt += "<p>浏览器平台: " + navigator.platform + "</p>";
      txt += "<p>User-agent头: " + navigator.userAgent + "</p>";
      document.write(txt);
    </script>
  </body>
</html>
